package com.rollawizards.server 
{
    import flash.events.Event;
    import flash.events.ProgressEvent;
    import flash.net.Socket;
    import flash.utils.ByteArray;

    public class Session
    {
        private var clientSocket:Socket;

        public function Session(clientSocket:Socket) 
        {
            this.clientSocket = clientSocket;
            clientSocket.addEventListener(ProgressEvent.SOCKET_DATA, onDataReceived);
        }
        
        private function onDataReceived(e:ProgressEvent):void
        {
            var buffer:ByteArray = new ByteArray();
            clientSocket.readBytes(buffer, 0, clientSocket.bytesAvailable);
        }
    }
}